<!--拒绝原因-->
<div id="upgrade-modal" style="top: 20%;" class="modal fade modal_small" role="dialog" aria-labelledby="myModalLabel1" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                <h4 class="modal-title">调整原因</h4>
            </div>
            <form action="<?php echo getUrl('member/merchant/upgrade');?>" class="form-horizontal" id="upgrade-form" method="post">
                <div class="modal-body">
                    <div class="form-group">
                        <label class="control-label col-md-3">等级<span class="required">*</span></label>
                        <div class="col-md-9">
                            <div class="radio-list">
                                <label class="radio-inline"><input name="rank" value="1" type="radio"> 初级 </label>
                                <label class="radio-inline" style="margin-left:30px"><input name="rank" value="2" type="radio"> 中级 </label>
                                <label class="radio-inline"><input name="rank" value="3" type="radio"> 高级 </label>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-md-3">调整原因<span class="required">*</span></label>
                        <div class="col-md-9">
                            <textarea  class="form-control required" name="reason" rows="5"></textarea>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <input type="hidden" name="id" value="<?php echo $info['id']?>">
                    <button class="btn green field-submit-btn"><i class="fa fa-save"></i> 保存</button>
                    <script type="text/javascript">
                        $(function() {
                            var modal = $('#upgrade-modal');
                            var rank = '<?php echo $info["rank"]?>';
                            $('.upgrade').live('click',function () {
                                modal.find('[name="reason"]').val('');
                                modal.find('.has-error').removeClass('has-error').find('.validate_message').remove();
                                modal.find('.show_message_error').remove();
                                modal.find('[type="radio"]').attr('checked', false);
                                modal.find('[type="radio"][value="'+rank+'"]').attr('checked', true);
                                modal.find('[type="radio"]').uniform();
                                modal.modal();
                            });
                            $.e_validate.init('#upgrade-form', {modal: modal, ignore: '', successCallback: function (data) {
                                // 商家升级
//                                $(".rank_name").html(data.rank_name);
//                                if(data.rank >= 3){
//                                    $(".rank").remove();
//                                }
                                history.go(0);
                            }});
                        });
                    </script>
                </div>
            </form>
        </div>
    </div>
</div>